extends Control
@onready var button_manager=$GridContainer
@export var Item_option:Dictionary={"装备":["equipped","unload","queue_free"],"材料":["queue_free"]}#示例 
@export var Item_type:Dictionary={"装备":["头盔","铠甲","护手","腰部","腿部"]}#这里可以通过之后将 物品表格分的更加仔细来省去这一步骤
var Now_bag:String#"Bag"即为普通的背包 “E_bag” 即为装备中
var Open_Slot:Slot
# Called when the node enters the scene tree for the first time.
func show_ItemOperate(open_slot:Slot):
	Open_Slot=open_slot
	Now_bag=Open_Slot.bag_name
	for button in Item_option["装备"]:
		button_manager.find_child("unload").disabled=true
		button_manager.find_child(button).visible=true
		if Now_bag=="E_bag":
			button_manager.find_child("equipped").disabled=true
			button_manager.find_child("unload").disabled=false
	pass

func _on_use_button_down():
	Open_Slot.use_item()
	pass # Replace with function body.


func _on_equipped_button_down():
	Open_Slot.equipped()
	pass # Replace with function body.


func _on_unload_button_down():
	Open_Slot.unload()
	pass # Replace with function body.


func _on_queue_free_button_down():
	Open_Slot.queue_free_item()
	pass # Replace with function body.
